﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="News.aspx.cs" Inherits="News" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContentPic">
    <!--<img src="Images/logo2.jpg" />-->
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolderLeft">
    <img src="Images/logo1.jpg" />
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    
    <asp:DataList ID="dListItems" runat="server" DataKeyField="ID" 
        BackColor="#FF0066" BorderColor="#00CC00" 
        ForeColor="#3366FF" GridLines="Horizontal" 
        onselectedindexchanged="DataList1_SelectedIndexChanged" Width="100%">
        <AlternatingItemStyle BackColor="#FFFF99" BorderColor="Red" 
            BorderStyle="Dotted" />
        <EditItemStyle BackColor="#6699FF" />
        <ItemStyle BackColor="Lime" />
        <ItemTemplate>
            <table>
                <tr>
                    <td>
                    ID:
                        <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
                        <br />
                    Title:
                    <a href="Details?ID=<%# Eval("ID") %>" ><%# Eval("Title") %></a>
                        <br />
                        <script language=javascript> assignHideShow(<%# Eval("Abstract") %>)</script>
                    Abstract:
                        <asp:Label ID="AbstractLabel" runat="server" Text='<%# Eval("Abstract") %>' />
                        <br />
                    </div>
                    Detail:
                        <asp:Label ID="DetailLabel" runat="server" Text='<%# Eval("Detail") %>' />
                        <br />
                    </td>
                    <td>
                        <a href="NewsDetails.aspx?ID=<%# Eval("ID") %>" >
                        <img src= "<%# Eval("Image") %>" height="20"/>
                        </a>
                        <br />
                    </td>
                </tr>
            </table>
            <br />
        </ItemTemplate>
        <SelectedItemStyle BackColor="#99CCFF" />
    </asp:DataList>
    <asp:DataList ID="dlPaging" runat="server" onitemcommand="dlPaging_ItemCommand" 
            onitemdatabound="dlPaging_ItemDataBound" RepeatDirection="Horizontal">
             <ItemTemplate>            
                <asp:LinkButton CommandArgument=<%# Eval("PageIndex") %> Text=<%# Eval("PageText") %>  CommandName="Paging" ID="lnkbtnPaging" runat="server" />
            </ItemTemplate>
        </asp:DataList>
		
		
		
        <asp:LinkButton ID="LinkButtonFirst" runat="server" 
            onclick="LinkButtonFirst_Click">First</asp:LinkButton>
        <asp:LinkButton ID="LinkButtonPre" runat="server" onclick="LinkButtonPre_Click">Pre</asp:LinkButton>
        <asp:LinkButton ID="LinkButtonNext" runat="server" 
            onclick="LinkButtonNext_Click">Next</asp:LinkButton>
        <asp:LinkButton ID="LinkButtonLast" runat="server" 
            onclick="LinkButtonLast_Click">Last</asp:LinkButton>
        <asp:Label ID="lblPageInfo" runat="server" Text="Position"></asp:Label>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:simbafConnectionString %>" 
        SelectCommand="SELECT * FROM [NEWS]"></asp:SqlDataSource>  
</asp:Content>
